﻿@{
    if(ViewContext.RouteData.Values[NRemedyUIExtension.FormModelKey] == null)
    {
        if(ViewContext.RouteData.Values["action"].ToString()== "Search")
        {
            Layout = "~/Views/Shared/_NoSearch_Layout.cshtml";
        }
        else
        {
            Layout = "~/Views/Shared/_Layout.cshtml";
        }
    }
    else
    {
        string vm = ViewContext.RouteData.Values[NRemedyUIExtension.FormModelKey].ToString();
        if (vm == "Search")
        {
            Layout = "~/Views/Shared/_Search_Layout.cshtml";
        }
        else
        {
            Layout = "~/Views/Shared/_Layout.cshtml";
        }
    }
}